import Vue from "vue"
import VueRouter from "vue-router"
import Main from "../views/Main.vue"
import Home from "../views/Home"
import User from "../views/User"
import Mall from '../views/mall'
import PageOne from '../views/Other/pageOne.vue'
import PageTwo from '../views/Other/pageTwo.vue'

Vue.use(VueRouter)

const routes= [
    {
        path:'/',
        name:'Main',
        component:Main,
        children:[
            {
                path:'/home',
                name:'home',
                component:Home
            },
            {
                path:'/user',
                name:'user',
                component:User
            },
            {
                path:'/mall',
                name:'mall',
                component:Mall
            },
            {
                path:'/page1',
                name:'page1',
                component:PageOne
            },
            {
                path:'/page2',
                name:'page2',
                component:PageTwo
            },
        ]
    }
]
const router=new VueRouter({
    mode:"history",
    routes
})
export default router